Get a List of Card Transactions
Getting the list of card transactions which are linked to a specified account.
Method: POST
{{URL}}/cardv2
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{URL}}/cardv2' \
--header 'Content-Type: application/json' \
--data '{"method":"ledger.CARD.request","id":"1","params":{"payload":{"reference":"REF1634130469012","transactionType":"GET_CARDTRANSACTION_LIST","customerId":"100000000184006","cardId":"79210cfaa0cf43978c2cfb874745c07f","accountNumber":"","cardTransactionType":"PURCHASE","fromDate":"04-01-2023","toDate":"06-01-2023","product":"CARDS","channel":"PULSE","program":"CARDS","pagination":{"offset":0,"max":6}}},"api":{"signature":"{{signature}}","apiKey":"{{apiKey}}","credential":"{{credential}}"}}'
using System;
using RestSharp;
using System.Threading;
using System.Threading.Tasks;
namespace HelloWorldApplication {
class HelloWorld {
static async Task Main(string[] args) {
var options = new RestClientOptions("{{URL}}/cardv2")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""ledger.CARD.request"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""reference"": ""visadps100161"",
" + "\n" +
@" ""transactionType"": ""GET_CARDTRANSACTION_LIST"",
" + "\n" +
@" ""customerId"": ""100000000006001"",
" + "\n" +
@" ""cardId"": ""3e694d9b13a449e58c6b3b91b0e16251"",
" + "\n" +
@" ""accountNumber"": ""400320588344662"",
" + "\n" +
@" ""cardTransactionType"": """",
" + "\n" +
@" ""fromDate"": ""20-11-2024"",
" + "\n" +
@" ""toDate"": ""20-11-2024"",
" + "\n" +
@" ""product"": ""DEFAULT"",
" + "\n" +
@" ""channel"": ""VISA_DPS"",
" + "\n" +
@" ""program"": ""DEFAULT"",
" + "\n" +
@" ""pagination"": {
" + "\n" +
@" ""offset"": 1,
" + "\n" +
@" ""max"": 6
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""apiKey"": ""{{Api-key}}"",
" + "\n" +
@" ""credential"": ""{{cred}}""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
}
}
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{URL}}/cardv2"
method := "GET"
payload := strings.NewReader(`{`+"
"+`
"method": "ledger.CARD.request",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"payload": {`+"
"+`
"reference": "visadps100161",`+"
"+`
"transactionType": "GET_CARDTRANSACTION_LIST",`+"
"+`
"customerId": "100000000006001",`+"
"+`
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",`+"
"+`
"accountNumber": "400320588344662",`+"
"+`
"cardTransactionType": "",`+"
"+`
"fromDate": "20-11-2024",`+"
"+`
"toDate": "20-11-2024",`+"
"+`
"product": "DEFAULT",`+"
"+`
"channel": "VISA_DPS",`+"
"+`
"program": "DEFAULT",`+"
"+`
"pagination": {`+"
"+`
"offset": 1,`+"
"+`
"max": 6`+"
"+`
}`+"
"+`
},`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"apiKey": "{{Api-key}}",`+"
"+`
"credential": "{{cred}}"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': '{{URL}}',
'path': '/cardv2',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "visadps100161",
"transactionType": "GET_CARDTRANSACTION_LIST",
"customerId": "100000000006001",
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"accountNumber": "400320588344662",
"cardTransactionType": "",
"fromDate": "20-11-2024",
"toDate": "20-11-2024",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"pagination": {
"offset": 1,
"max": 6
}
},
"api": {
"signature": "{{signature}}",
"apiKey": "{{Api-key}}",
"credential": "{{cred}}"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "visadps100161",
"transactionType": "GET_CARDTRANSACTION_LIST",
"customerId": "100000000006001",
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"accountNumber": "400320588344662",
"cardTransactionType": "",
"fromDate": "20-11-2024",
"toDate": "20-11-2024",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"pagination": {
"offset": 1,
"max": 6
}
},
"api": {
"signature": "{{signature}}",
"apiKey": "{{Api-key}}",
"credential": "{{cred}}"
}
}
}
Response: 200
Response Parameters
{
"id": "1",
"result": {
"totalRecords": 10,
"api": {
"type": "GET_CARDTRANSACTION_LIST_ACK",
"reference": "REFvisadps100161",
"dateCreated": 1732105574,
"originalReference": "visadps100161"
},
"cardTransactionList": [
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070026",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "5a27c393-2df2-456a-8785-6cec88d099fd",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "84b7f78602af4119a420b406a3605642",
"transactionType": "COMPLETION",
"transactionSubType": "COMPLETION_DOM",
"to": "AFD1 CITY NAME COUS",
"transactionDateTime": "2024-11-20T10:00:00Z",
"currency": "USD",
"transactionAmount": "46.23",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070025",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "400320588344662",
"processId": "5a27c393-2df2-456a-8785-6cec88d099fd",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "d0c36938904648f380c4bd818ee54e25",
"transactionType": "PRE_AUTH",
"transactionSubType": "PRE_AUTH_DOM",
"to": "AFD1 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:41Z",
"currency": "USD",
"transactionAmount": "75.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070023",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "20897e29-e125-40d6-a1b6-27d03ea1eee9",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "d63af6766bc4491ab5fe4e38a752eab7",
"transactionType": "WITHDRAWAL",
"transactionSubType": "WITHDRAWAL_DOM",
"to": "ATM6 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:41Z",
"currency": "USD",
"transactionAmount": "70.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070021",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "bb0be055-7b27-44f3-bf72-bf4de6e8877c",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "78b1ccd9186e4574913e89b34ba1152f",
"transactionType": "WITHDRAWAL",
"transactionSubType": "WITHDRAWAL_DOM",
"to": "ATM2 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:40Z",
"currency": "USD",
"transactionAmount": "60.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070020",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "3ab9c456-daf3-4712-853d-8698306e3745",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "66bc45ed786d442fbe261277500e52aa",
"transactionType": "WITHDRAWAL",
"transactionSubType": "WITHDRAWAL_DOM",
"to": "ATM2 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:40Z",
"currency": "USD",
"transactionAmount": "20.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070019",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "32d94fb4-a536-488b-9eda-6bfd4ffd49c1",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "047e05eb8dc24f9fb373d3c2f4586624",
"transactionType": "COMPLETION",
"transactionSubType": "COMPLETION_DOM",
"to": "AFD1 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:48:30Z",
"currency": "USD",
"transactionAmount": "46.23",
"status": "COMPLETED"
}
]
}
}